<!DOCTYPE html>
<html>
  <head>
  	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="format-detection" content="telephone=no">
	<title>${cms_sitetitle}</title>
	<meta name="keywords" content="${cms_keywords}" />
    <meta name="description" content="${cms_descinfo}" />
	<link rel="stylesheet" type="text/css"  href="/css/swiper.min.css">
    <link rel="stylesheet" type="text/css"  href="/css/css.css"/>
  </head>
  <script>
    document.getElementsByTagName('html')[0].style.fontSize = document.documentElement.clientWidth/7.5 + 'px'
    window.onresize = function() {
        document.getElementsByTagName('html')[0].style.fontSize = document.documentElement.clientWidth/7.5 + 'px'
    }
</script>
  <body>


	@include("/header.html",{"topcode":topcode,"activeclass":"cur"}){}

	<div class="location">
		<div class="loactionCont">
			<div class="locationInfor">
				当前位置:<a href="/">首页</a>
					@for(p in positions){
						<span>&gt;</span>
						<a href="${p.url}">${p.name}</a>
				   @}
			</div>
			<div class="tabName">
				<#cms_channels pcode="${topcode}" ;channels>
				@for(channel in channels){
					@if(channel.code == code ){
						<a href="${channel.url}" class="cur">
					@}else{
						<a href="${channel.url}">
					@}
					${channel.name}</a>
				@}
			</#cms_channels>
			</div>
		</div>
	</div>
	<div class="newsPage">
		<div class="newsTitle">
			<#cms_channels code="${code}" ;channels>
				@for(channel in channels){
					${channel.name}
				@}
			</#cms_channels>
		</div>
		

		<div class="newLi">
			<ul>
			<#cms_articlelist code="${code}" pagesize="5" pageindex="${current}" orderby="pubdate" orderway="desc" ;articles,totalpage,total>
			@for(item in articles){
				<li>
					<a href="${item.url}">
						<div class="newPic">
							<img src="${item.picname==''?cms_default_pic:item.picname}" >
						</div>
						<div class="newRight">
							<div class="newsInfor">
								<h2>${item.title}</h2>
								<p>${item.info}...</p>
								<!-- <span>${item.pubdate,"yyyy-MM-dd"}</span> -->
							</div>
							<div class="newDate">
								<p>${item.pubdate,"dd"}</p>
								<span>${item.pubdate,"yyyy/MM"}</span>
							</div>
						</div>
					</a>
				</li>
				@}
			</ul>
		</div>
		<#cms_page totalpage = "${totalpage}" currenturl="${currenturl}" showpage="4";page>
		<div class="fpage">
			<span>共${total}条记录</span>
					@if(page.haspre){
						<a href="${page.pre}" class="prevPage"></a>
					@}
					@for(p in page.prelist){
						<a href="${p.url}">${p.index}</a>
					@}
						<a href="${page.currenturl}" class="cur">${page.current}</a>
					@for(p in page.nextlist){
						<a href="${p.url}">${p.index}</a>
					@}
					@if(page.hasnext){
						<a href="${page.next}" class="nextPage"></a>
					@}
				</div>
			</#cms_page>
		</#cms_articlelist>

	</div>
	
	@include("/footer.html"){}

  </body>
  <script src="/js/swiper.min.js"></script>
  <script type="text/javascript" src="/js/jquery-2.1.4.js"></script>
  <script>
	var swiperBanner = new Swiper(".banner .mySwiper", {
		pagination: {
		  el: ".banner .swiper-pagination",
		  clickable:true,
		},
		loop:true,
		autoplay:true,
	  });
	//新闻切换
	  $('.newsHd span').click(function(){
	  	$(this).addClass('cur').siblings().removeClass('cur');
	  	var num = $(this).index();
	  	$('.newsBd .newsSlide').eq(num).fadeIn().siblings().hide();
	  })
	  var swiperthingHd = new Swiper('.thingHd .swiper-container', {
		slidesPerView: 17,
		spaceBetween: 30,
		centeredSlides: true,
		on: {
		    slideChangeTransitionStart: function(){
		      var num = this.activeIndex;
			  $('.thingBd .thingSlide').eq(num).fadeIn().siblings().hide();
		    },
		  },
	  });
	  //搜索
	  $('.headerSearch span').click(function(){
	  	$(this).siblings('.searchSub').fadeToggle();
	  })
	  $(".searchBtn").click(function(){
		console.log($("#searchTextInput").val());
		var searchTextInput =$("#searchTextInput").val();
		if(searchTextInput){
			window.location.href="/page/search?name="+searchTextInput+"&pagesize=1&pageindex=1";
		}
	})
	  $('.menu').click(function(){
	  	if($(this).hasClass('on')){
	  		$(this).removeClass('on');
	  		$('#screen').fadeOut();
	  		$('.nav').animate({'left':'-110%'},500)
	  	}else{
	  		$(this).addClass('on');
	  		$('#screen').fadeIn();
	  		$('.nav').animate({'left':'0'},500)
	  	}
	  })
	  $('#screen').click(function(){
	  	$('.menu').removeClass('on');
	  	$('#screen').fadeOut();
	  	$('.nav').animate({'left':'-110%'},500)
	  })
  </script>
</html>
